/*
 * @Description: 拆分案卷弹窗
 * @Author: Rfan
 * @Date: 2022-07-18 15:02:39
 * @LastEditTime: 2022-07-18 16:02:39
 */

import { useEffect, useMemo, useState } from 'react';
import { Button } from 'antd';
import type { FC } from 'react';
import Separate from '@/components/LevelTable/componentes/dialogs/Separate';

const SAVE_TYPE = {
  CANCEL: 1,
  SAVE: 2
};

interface IBreakUpFilesBtn {
  onSave: any;
}

const BreakUpFilesBtn: FC<IBreakUpFilesBtn> = (props) => {
  const { onSave } = props;

  // 弹窗展示状态
  const [visible, setVisible] = useState(false);

  useEffect(() => {
    if (visible) {
      //
    }
  }, [visible]);

  return (
    <>
      <Button
        onClick={() => {
          setVisible(true);
        }}
      >
        打散卷内文件
      </Button>
      {useMemo(
        () => (
          <Separate
            visible={visible}
            onClose={() => {
              setVisible(false);
            }}
          />
        ),
        [visible]
      )}
    </>
  );
};

export default BreakUpFilesBtn;
